com.justhis.util
Class PropertiesReader

java.lang.Object
  extended bycom.justhis.util.PropertiesReader

public class PropertiesReader
extends java.lang.Object

???????????? ????????????????????????????????????????????classpath??????????

Version:
$Revision: 1.1 $
Author:
acai

Constructor Summary
PropertiesReader(java.io.InputStream stream)
          Creates a new PropertiesReader object.
PropertiesReader(java.lang.String propertiesFile)
          Creates a new PropertiesReader object.
 
Method Summary
protected  void buildFromFile(java.lang.String file)
          TODO
protected  void buildFromProperties(java.lang.String file)
          TODO
 java.util.Enumeration getKeys()
          TODO
 java.util.Properties getProperties()
          Get properties
static java.util.Properties getProperties(java.lang.String fileName)
          get properties by construct a PropertiesReader
 java.lang.String getProperty(java.lang.String propertyName)
          TODO
 java.util.Map getPropertyMap()
          TODO
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertiesReader

public PropertiesReader(java.lang.String propertiesFile)
                 throws PropertiesFileReadException
Creates a new PropertiesReader object. use properties file name or path

Parameters:
propertiesFile - file name or path
Throws:
PropertiesFileReadException - if any error occurs.

PropertiesReader

public PropertiesReader(java.io.InputStream stream)
                 throws PropertiesFileReadException
Creates a new PropertiesReader object. use stream.

Parameters:
stream - a stream of input
Throws:
PropertiesFileReadException - if any error occurs
Method Detail

getKeys

public java.util.Enumeration getKeys()
TODO

Returns:
TODO

getProperties

public java.util.Properties getProperties()
Get properties

Returns:
java.util.Properties

getProperties

public static java.util.Properties getProperties(java.lang.String fileName)
                                          throws PropertiesFileReadException
get properties by construct a PropertiesReader

Parameters:
fileName - a properties name
Returns:
java.util.Properties
Throws:
PropertiesFileReadException - if any error occurs.

getProperty

public java.lang.String getProperty(java.lang.String propertyName)
TODO

Parameters:
propertyName - TODO
Returns:
TODO

getPropertyMap

public java.util.Map getPropertyMap()
TODO

Returns:
TODO

buildFromFile

protected void buildFromFile(java.lang.String file)
                      throws PropertiesFileReadException
TODO

Parameters:
file - TODO
Throws:
PropertiesFileReadException - TODO

buildFromProperties

protected void buildFromProperties(java.lang.String file)
                            throws PropertiesFileReadException
TODO

Parameters:
file - TODO
Throws:
PropertiesFileReadException - TODO


Copyright © 2003 EastNetworks.Net(China)Co.,Ltd.. All Rights Reserved.